import type { PlatformOption } from "./types";

// 平台选项配置
const platformOptions: PlatformOption[] = [
  {
    value: 1,
    label: "TikTok",
    type: "primary"
  },
  {
    value: 2,
    label: "Facebook",
    type: "warning"
  }
];

// 平台类型映射
const platformTypeMap = {
  1: { label: "TikTok", type: "primary" },
  2: { label: "Facebook", type: "warning" }
};

// 获取平台信息
const getPlatformInfo = (platform: number, returnType: 'label' | 'type' = 'label') => {
  const info = platformTypeMap[platform];
  if (!info) return returnType === 'label' ? '未知' : 'info';
  return info[returnType];
};

// 导出配置
export {
  platformOptions,
  platformTypeMap,
  getPlatformInfo
}; 